<%--
  Created by IntelliJ IDEA.
  User: 9joint
  Date: 2017/7/18
  Time: 11:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>文件预览</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width" />
    <style type="text/css" media="screen">
        html, body	{ height:100%; }
        body { margin:0; padding:0; overflow:auto; }
        #flashContent { display:none; }
    </style>
    <script src="<%=path%>/resource/core/js/jquery-2.2.4.min.js"></script>
    <script type="text/javascript" src="<%=path%>/resource/core/js/flexpaper.js"></script>
    <script type="text/javascript" src="<%=path%>/resource/core/js/flexpaper_handlers.js"></script>
</head>
<body>

<div id="documentViewer" class="flexpaper_viewer" style="width:820px;height:650px">

    <script type="text/javascript">


        $(function(){
            var height = document.documentElement.clientHeight-10;
            var width = document.documentElement.clientWidth-10;
            $('#documentViewer').css('height',height);
            $('#documentViewer').css('width',width);
           // alert('${filePath}');
            $('#documentViewer').FlexPaperViewer(
                { config : {
                    SWFFile :  escape('${filePath}'),
                    Scale : 1.2,
                    ZoomTransition : 'easeOut',
                    ZoomTime : 0.5,
                    ZoomInterval : 0.2,
                    FitPageOnLoad : false,
                    FitWidthOnLoad : false,
                    FullScreenAsMaxWindow : false,
                    ProgressiveLoading : false,
                    MinZoomSize : 0.2,
                    MaxZoomSize : 5,
                    SearchMatchAll : false,
                    InitViewMode : 'Portrait',
                    RenderingOrder : 'flash',
                    StartAtPage : '',
                    ViewModeToolsVisible : true,
                    ZoomToolsVisible : true,
                    NavToolsVisible : true,
                    CursorToolsVisible : true,
                    SearchToolsVisible : true,
                    WMode : 'window',
                    localeChain: 'en_US'
                    //FitPageOnLoad : true   
                    //FitWidthOnLoad : true
                }}
            );
        });


    </script>

</body>
</html>